/*
 Navicat Premium Data Transfer

 Source Server         : mysql#local
 Source Server Type    : MySQL
 Source Server Version : 50728
 Source Host           : 127.0.0.1:3306
 Source Schema         : cdh6.3.1_cmf_init

 Target Server Type    : MySQL
 Target Server Version : 50728
 File Encoding         : 65001

 Date: 14/07/2022 21:42:58
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for audits
-- ----------------------------
DROP TABLE IF EXISTS `audits`;
CREATE TABLE `audits` (
  `AUDIT_ID` bigint(20) NOT NULL,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  `ROLE_ID` bigint(20) DEFAULT NULL,
  `CREATED_INSTANT` bigint(20) DEFAULT NULL,
  `MESSAGE` longtext,
  `ACTING_USER_ID` bigint(20) DEFAULT NULL,
  `COMMAND_ID` bigint(20) DEFAULT NULL,
  `USER_ID` bigint(20) DEFAULT NULL,
  `HOST_ID` bigint(20) DEFAULT NULL,
  `AUDIT_TYPE` varchar(255) NOT NULL DEFAULT 'UNKNOWN',
  `CONFIG_CONTAINER_ID` bigint(20) DEFAULT NULL,
  `CLUSTER_ID` bigint(20) DEFAULT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `HOST_TEMPLATE_ID` bigint(20) DEFAULT NULL,
  `IP_ADDRESS` varchar(255) DEFAULT NULL,
  `ALLOWED` tinyint(1) NOT NULL DEFAULT '1',
  `EXTERNAL_ACCOUNT_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`AUDIT_ID`) USING BTREE,
  KEY `IDX_AUDIT_CREATED_INSTANT` (`CREATED_INSTANT`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of audits
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for auth_roles
-- ----------------------------
DROP TABLE IF EXISTS `auth_roles`;
CREATE TABLE `auth_roles` (
  `AUTH_ROLE_ID` bigint(20) NOT NULL,
  `UUID` varchar(255) NOT NULL,
  `NAME` varchar(255) DEFAULT NULL,
  `BASE_ROLE_ID` bigint(20) DEFAULT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`AUTH_ROLE_ID`) USING BTREE,
  KEY `FK_AUTH_ROLES_BASE_ROLE` (`BASE_ROLE_ID`) USING BTREE,
  CONSTRAINT `auth_roles_ibfk_1` FOREIGN KEY (`BASE_ROLE_ID`) REFERENCES `auth_roles` (`AUTH_ROLE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of auth_roles
-- ----------------------------
BEGIN;
INSERT INTO `auth_roles` VALUES (10, 'c5c0edc1-1b6e-439a-b970-e5548071033f', 'ROLE_ADMIN', NULL, 1);
INSERT INTO `auth_roles` VALUES (11, '094f361f-9b03-493a-b759-a9d665079b6a', 'ROLE_AUDITOR', NULL, 0);
INSERT INTO `auth_roles` VALUES (12, '4dacd4b7-a2e9-4d66-bd29-e5605bd08483', 'ROLE_DASHBOARD_USER', NULL, 0);
COMMIT;

-- ----------------------------
-- Table structure for auth_roles_scopes
-- ----------------------------
DROP TABLE IF EXISTS `auth_roles_scopes`;
CREATE TABLE `auth_roles_scopes` (
  `AUTH_ROLE_SCOPE_ID` bigint(20) NOT NULL,
  `AUTH_ROLE_ID` bigint(20) NOT NULL,
  `SCOPE_CLUSTER_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`AUTH_ROLE_SCOPE_ID`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_AUTH_SCOPE` (`AUTH_ROLE_ID`,`SCOPE_CLUSTER_ID`) USING BTREE,
  KEY `FK_AUTH_ROLE_ID` (`AUTH_ROLE_ID`) USING BTREE,
  KEY `FK_SCOPE_CLUSTER_ID` (`SCOPE_CLUSTER_ID`) USING BTREE,
  CONSTRAINT `auth_roles_scopes_ibfk_1` FOREIGN KEY (`AUTH_ROLE_ID`) REFERENCES `auth_roles` (`AUTH_ROLE_ID`),
  CONSTRAINT `auth_roles_scopes_ibfk_2` FOREIGN KEY (`SCOPE_CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of auth_roles_scopes
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for client_configs
-- ----------------------------
DROP TABLE IF EXISTS `client_configs`;
CREATE TABLE `client_configs` (
  `CLIENT_CONFIG_ID` bigint(20) NOT NULL,
  `CREATED_INSTANT` bigint(20) NOT NULL,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  `CONFIG_ARCHIVE` mediumblob NOT NULL,
  `MIME_TYPE` varchar(255) NOT NULL,
  `FILENAME` varchar(255) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `CONFIG_STALENESS_STATUS` varchar(255) NOT NULL,
  `METADATA` longtext NOT NULL,
  `GATEWAY_ID` bigint(20) DEFAULT NULL,
  `CLUSTER_ID` bigint(20) DEFAULT NULL,
  `GENERATION` bigint(20) NOT NULL,
  `RESOURCES` longtext,
  PRIMARY KEY (`CLIENT_CONFIG_ID`) USING BTREE,
  KEY `FK_CLIENT_CONFIG_SERVICE` (`SERVICE_ID`) USING BTREE,
  KEY `IDX_CLIENT_CONFIG_GATEWAY` (`GATEWAY_ID`) USING BTREE,
  KEY `IDX_CLIENT_CONFIG_CLUSTER` (`CLUSTER_ID`) USING BTREE,
  CONSTRAINT `client_configs_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`),
  CONSTRAINT `client_configs_ibfk_2` FOREIGN KEY (`GATEWAY_ID`) REFERENCES `roles` (`ROLE_ID`),
  CONSTRAINT `client_configs_ibfk_3` FOREIGN KEY (`SERVICE_ID`) REFERENCES `services` (`SERVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of client_configs
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for client_configs_to_hosts
-- ----------------------------
DROP TABLE IF EXISTS `client_configs_to_hosts`;
CREATE TABLE `client_configs_to_hosts` (
  `CLIENT_CONFIG_ID` bigint(20) NOT NULL,
  `HOST_ID` bigint(20) NOT NULL,
  KEY `IDX_CLIENT_CFG2HOST_CLIENT_CFG` (`CLIENT_CONFIG_ID`) USING BTREE,
  KEY `IDX_CLIENT_CFG2HOST_HOST` (`HOST_ID`) USING BTREE,
  CONSTRAINT `client_configs_to_hosts_ibfk_1` FOREIGN KEY (`CLIENT_CONFIG_ID`) REFERENCES `client_configs` (`CLIENT_CONFIG_ID`),
  CONSTRAINT `client_configs_to_hosts_ibfk_2` FOREIGN KEY (`HOST_ID`) REFERENCES `hosts` (`HOST_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of client_configs_to_hosts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cluster_activated_releases
-- ----------------------------
DROP TABLE IF EXISTS `cluster_activated_releases`;
CREATE TABLE `cluster_activated_releases` (
  `CLUSTER_ID` bigint(20) NOT NULL,
  `RELEASE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`CLUSTER_ID`,`RELEASE_ID`) USING BTREE,
  KEY `IDX_CLSTR_ACTV_RLS_CLSTR` (`CLUSTER_ID`) USING BTREE,
  KEY `IDX_CLSTR_ACTV_RLS_RLS` (`RELEASE_ID`) USING BTREE,
  CONSTRAINT `cluster_activated_releases_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`),
  CONSTRAINT `cluster_activated_releases_ibfk_2` FOREIGN KEY (`RELEASE_ID`) REFERENCES `releases` (`RELEASE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of cluster_activated_releases
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cluster_activated_releases_aud
-- ----------------------------
DROP TABLE IF EXISTS `cluster_activated_releases_aud`;
CREATE TABLE `cluster_activated_releases_aud` (
  `CLUSTER_ID` bigint(20) NOT NULL,
  `RELEASE_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`REV`,`CLUSTER_ID`,`RELEASE_ID`) USING BTREE,
  KEY `FK_CLUSTER_ACTIVATED_RELEASES_REVISION_START` (`REV`) USING BTREE,
  CONSTRAINT `cluster_activated_releases_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of cluster_activated_releases_aud
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cluster_managed_releases
-- ----------------------------
DROP TABLE IF EXISTS `cluster_managed_releases`;
CREATE TABLE `cluster_managed_releases` (
  `CLUSTER_ID` bigint(20) NOT NULL,
  `RELEASE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`CLUSTER_ID`,`RELEASE_ID`) USING BTREE,
  KEY `IDX_CLSTR_MNGD_RLS_CLSTR` (`CLUSTER_ID`) USING BTREE,
  KEY `IDX_CLSTR_MNGD_RLS_RLS` (`RELEASE_ID`) USING BTREE,
  CONSTRAINT `cluster_managed_releases_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`),
  CONSTRAINT `cluster_managed_releases_ibfk_2` FOREIGN KEY (`RELEASE_ID`) REFERENCES `releases` (`RELEASE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of cluster_managed_releases
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cluster_undistributed_releases
-- ----------------------------
DROP TABLE IF EXISTS `cluster_undistributed_releases`;
CREATE TABLE `cluster_undistributed_releases` (
  `CLUSTER_ID` bigint(20) NOT NULL,
  `RELEASE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`CLUSTER_ID`,`RELEASE_ID`) USING BTREE,
  KEY `IDX_CLSTR_UNDIST_RLS_CLSTR` (`CLUSTER_ID`) USING BTREE,
  KEY `IDX_CLSTR_UNDIST_RLS_RLS` (`RELEASE_ID`) USING BTREE,
  CONSTRAINT `cluster_undistributed_releases_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`),
  CONSTRAINT `cluster_undistributed_releases_ibfk_2` FOREIGN KEY (`RELEASE_ID`) REFERENCES `releases` (`RELEASE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of cluster_undistributed_releases
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for clusters
-- ----------------------------
DROP TABLE IF EXISTS `clusters`;
CREATE TABLE `clusters` (
  `CLUSTER_ID` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `MAINTENANCE_COUNT` int(11) NOT NULL DEFAULT '0',
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `CDH_VERSION` varchar(255) NOT NULL,
  `DISPLAY_NAME` varchar(255) NOT NULL,
  `UUID` varchar(255) DEFAULT NULL,
  `DATA_CONTEXT_ID` bigint(20) DEFAULT NULL,
  `CLUSTER_TYPE` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`CLUSTER_ID`) USING BTREE,
  UNIQUE KEY `NAME` (`NAME`) USING BTREE,
  UNIQUE KEY `DISPLAY_NAME` (`DISPLAY_NAME`) USING BTREE,
  KEY `FK_DATA_CONTEXT_ID` (`DATA_CONTEXT_ID`) USING BTREE,
  CONSTRAINT `clusters_ibfk_1` FOREIGN KEY (`DATA_CONTEXT_ID`) REFERENCES `data_contexts` (`DATA_CONTEXT_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of clusters
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for clusters_aud
-- ----------------------------
DROP TABLE IF EXISTS `clusters_aud`;
CREATE TABLE `clusters_aud` (
  `CLUSTER_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  `NAME` varchar(255) DEFAULT NULL,
  `CDH_VERSION` varchar(255) DEFAULT NULL,
  `DISPLAY_NAME` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`CLUSTER_ID`,`REV`) USING BTREE,
  KEY `FK_CLUSTER_REVISION_START` (`REV`) USING BTREE,
  CONSTRAINT `clusters_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of clusters_aud
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cm_peers
-- ----------------------------
DROP TABLE IF EXISTS `cm_peers`;
CREATE TABLE `cm_peers` (
  `PEER_ID` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `URL` varchar(256) NOT NULL,
  `USERNAME` varchar(256) NOT NULL,
  `PASSWORD` varchar(256) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `PEER_TYPE` varchar(255) NOT NULL,
  `CREATED_REMOTE_USER` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`PEER_ID`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_CM_PEERS` (`NAME`,`PEER_TYPE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of cm_peers
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for cm_version
-- ----------------------------
DROP TABLE IF EXISTS `cm_version`;
CREATE TABLE `cm_version` (
  `VERSION` varchar(256) NOT NULL,
  `GUID` varchar(36) NOT NULL,
  `LAST_UPDATE_INSTANT` bigint(20) DEFAULT NULL,
  `TS` bigint(20) DEFAULT NULL,
  `HOSTNAME` varchar(255) DEFAULT NULL,
  `LAST_ACTIVE_TIMESTAMP` bigint(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of cm_version
-- ----------------------------
BEGIN;
INSERT INTO `cm_version` VALUES ('6.3.1', 'd91429fe-3b57-47c0-8fb7-97f6c8d5e0fa', 1650647157623, NULL, 'emr-master-1/172.24.47.4', 1657805819100);
COMMIT;

-- ----------------------------
-- Table structure for command_schedules
-- ----------------------------
DROP TABLE IF EXISTS `command_schedules`;
CREATE TABLE `command_schedules` (
  `SPEC_ID` bigint(20) NOT NULL,
  `COMMAND_NAME` varchar(255) NOT NULL,
  `COMMAND_ARGUMENTS` longtext,
  `CLUSTER_ID` bigint(20) DEFAULT NULL,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  `ROLE_ID` bigint(20) DEFAULT NULL,
  `HOST_ID` bigint(20) DEFAULT NULL,
  `START_TIME` bigint(20) NOT NULL,
  `END_TIME` bigint(20) DEFAULT NULL,
  `REPEAT_INTERVAL` bigint(20) NOT NULL,
  `REPEAT_INTERVAL_UNIT` varchar(255) NOT NULL,
  `PAUSED` bit(1) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `VERSION` bigint(20) NOT NULL,
  `FIRE_AFTER_TIME` bigint(20) DEFAULT NULL,
  `DISPLAY_NAME` varchar(255) DEFAULT NULL,
  `DESCRIPTION` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`SPEC_ID`) USING BTREE,
  UNIQUE KEY `unique_display_name` (`DISPLAY_NAME`) USING BTREE,
  KEY `FK_COMMAND_SCHEDULE_CLUSTER` (`CLUSTER_ID`) USING BTREE,
  KEY `FK_COMMAND_SCHEDULE_SERVICE` (`SERVICE_ID`) USING BTREE,
  KEY `FK_COMMAND_SCHEDULE_ROLE` (`ROLE_ID`) USING BTREE,
  KEY `FK_COMMAND_SCHEDULE_HOST` (`HOST_ID`) USING BTREE,
  CONSTRAINT `command_schedules_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`),
  CONSTRAINT `command_schedules_ibfk_2` FOREIGN KEY (`HOST_ID`) REFERENCES `hosts` (`HOST_ID`),
  CONSTRAINT `command_schedules_ibfk_3` FOREIGN KEY (`ROLE_ID`) REFERENCES `roles` (`ROLE_ID`),
  CONSTRAINT `command_schedules_ibfk_4` FOREIGN KEY (`SERVICE_ID`) REFERENCES `services` (`SERVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of command_schedules
-- ----------------------------
BEGIN;
INSERT INTO `command_schedules` VALUES (1, 'GlobalPoolsRefresh', '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":null,\"scheduleId\":null,\"scheduledTime\":null}', NULL, NULL, NULL, NULL, 1650650400000, NULL, 1, 'HOUR', b'0', 1989, 0, 1657803600000, NULL, NULL);
INSERT INTO `command_schedules` VALUES (3, 'global-collect-host-statistics', '{\"@class\":\"com.cloudera.cmf.command.datacollection.GlobalCollectHostStatCmdArgs\",\"alertConfig\":null,\"archiveType\":\"GLOBAL_HOST_STATISTICS_SUPPORT_BUNDLE\",\"args\":null,\"bundleSizeBytes\":104857600,\"clusterName\":null,\"comments\":\"\",\"enableEstimation\":false,\"enableMonitorMetricsCollection\":false,\"endTime\":1657805703543,\"files\":null,\"free\":true,\"licenseKey\":\"d91429fe-3b57-47c0-8fb7-97f6c8d5e0fa\",\"phoneHome\":true,\"roles\":[],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null,\"service2DiagnosticsResult\":{},\"startTime\":null,\"ticketNumber\":\"\"}', NULL, NULL, NULL, NULL, 1350835200000, NULL, 1, 'WEEK', b'0', 0, 0, 1657805703571, NULL, NULL);
COMMIT;

-- ----------------------------
-- Table structure for commands
-- ----------------------------
DROP TABLE IF EXISTS `commands`;
CREATE TABLE `commands` (
  `COMMAND_ID` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `STATE` varchar(255) DEFAULT NULL,
  `START_INSTANT` bigint(20) DEFAULT NULL,
  `END_INSTANT` bigint(20) DEFAULT NULL,
  `ACTIVE` int(11) DEFAULT NULL,
  `RESULT_MESSAGE` longtext,
  `RESULT_DATA` mediumblob,
  `RESULT_DATA_MIME_TYPE` varchar(255) DEFAULT NULL,
  `RESULT_DATA_FILENAME` varchar(255) DEFAULT NULL,
  `SUCCESS` bit(1) DEFAULT NULL,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  `ROLE_ID` bigint(20) DEFAULT NULL,
  `PARENT_ID` bigint(20) DEFAULT NULL,
  `HOST_ID` bigint(20) DEFAULT NULL,
  `RESULT_DATA_PATH` varchar(255) DEFAULT NULL,
  `RESULT_DATA_REAPED` bit(1) DEFAULT b'0',
  `CLUSTER_ID` bigint(20) DEFAULT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `SCHEDULE_ID` bigint(20) DEFAULT NULL,
  `ARGUMENTS` longtext,
  `AUDITED` bit(1) NOT NULL DEFAULT b'0',
  `FIRST_UPDATED_INSTANT` bigint(20) DEFAULT NULL,
  `CREATION_INSTANT` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`COMMAND_ID`) USING BTREE,
  KEY `FK_COMMAND_ROLE` (`ROLE_ID`) USING BTREE,
  KEY `FK_COMMAND_PARENT` (`PARENT_ID`) USING BTREE,
  KEY `FK_COMMAND_SERVICE` (`SERVICE_ID`) USING BTREE,
  KEY `FK_COMMAND_HOST` (`HOST_ID`) USING BTREE,
  KEY `IDX_COMMAND_ACTIVE` (`ACTIVE`) USING BTREE,
  KEY `FK_COMMAND_CLUSTER` (`CLUSTER_ID`) USING BTREE,
  KEY `IDX_COMMAND_SCHEDULE` (`SCHEDULE_ID`) USING BTREE,
  KEY `IDX_START_INSTANT` (`START_INSTANT`) USING BTREE,
  KEY `IDX_COMMAND_STATE` (`STATE`) USING BTREE,
  CONSTRAINT `commands_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`),
  CONSTRAINT `commands_ibfk_2` FOREIGN KEY (`HOST_ID`) REFERENCES `hosts` (`HOST_ID`),
  CONSTRAINT `commands_ibfk_3` FOREIGN KEY (`PARENT_ID`) REFERENCES `commands` (`COMMAND_ID`),
  CONSTRAINT `commands_ibfk_4` FOREIGN KEY (`ROLE_ID`) REFERENCES `roles` (`ROLE_ID`),
  CONSTRAINT `commands_ibfk_5` FOREIGN KEY (`SCHEDULE_ID`) REFERENCES `command_schedules` (`SPEC_ID`),
  CONSTRAINT `commands_ibfk_6` FOREIGN KEY (`SERVICE_ID`) REFERENCES `services` (`SERVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of commands
-- ----------------------------
BEGIN;
INSERT INTO `commands` VALUES (1, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647220777, 1650647285969, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfigContainer.configsForDb (#2) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647220788, 1650647220777);
INSERT INTO `commands` VALUES (2, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647221099, 1650647286058, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfig.valueForDb (#1) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647221100, 1650647221099);
INSERT INTO `commands` VALUES (3, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647221962, 1650647286093, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfig.valueForDb (#1) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647221963, 1650647221962);
INSERT INTO `commands` VALUES (4, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647222889, 1650647286149, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfig.valueForDb (#1) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647222891, 1650647222889);
INSERT INTO `commands` VALUES (5, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647223848, 1650647286200, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfig.valueForDb (#1) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647223848, 1650647223848);
INSERT INTO `commands` VALUES (6, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647224215, 1650647286219, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfig.valueForDb (#1) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647224217, 1650647224215);
INSERT INTO `commands` VALUES (7, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647224415, 1650647286272, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfig.valueForDb (#1) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647224416, 1650647224415);
INSERT INTO `commands` VALUES (8, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647224638, 1650647286343, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: Initialized CSD registry\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647224639, 1650647224638);
INSERT INTO `commands` VALUES (9, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647264978, 1650647286429, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfigContainer.configsForDb (#2) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647264980, 1650647264978);
INSERT INTO `commands` VALUES (10, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647283225, 1650647286525, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbConfigContainer.configsForDb (#2) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647283226, 1650647283225);
INSERT INTO `commands` VALUES (11, 'GenerateCredentials', 'FINISHED', 1650647285231, 1650647286639, 0, 'No roles required Kerberos credentials to be generated.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647286587, 1650647285231);
INSERT INTO `commands` VALUES (12, 'ProcessStalenessCheckCommand', 'FINISHED', 1650647287656, 1650647287882, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbHost.name (#1) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1650647287657, 1650647287656);
INSERT INTO `commands` VALUES (13, 'ProcessStalenessCheckCommand', 'FINISHED', 1657805688881, 1657805703974, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: Initialized CSD registry\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1657805688895, 1657805688881);
INSERT INTO `commands` VALUES (14, 'GenerateCredentials', 'FINISHED', 1657805703918, 1657805704704, 0, 'No roles required Kerberos credentials to be generated.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1657805704700, 1657805703918);
INSERT INTO `commands` VALUES (15, 'ProcessStalenessCheckCommand', 'FINISHED', 1657805709366, 1657805709470, 0, 'Successfully finished checking for configuration staleness.', NULL, NULL, NULL, b'1', NULL, NULL, NULL, NULL, NULL, b'0', NULL, 2, NULL, '{\"@class\":\"com.cloudera.cmf.command.BasicCmdArgs\",\"alertConfig\":null,\"args\":[\"First reason why: com.cloudera.cmf.model.DbHost.name (#1) has changed\"],\"scheduleId\":null,\"scheduleName\":null,\"scheduledTime\":null}', b'0', 1657805709371, 1657805709366);
COMMIT;

-- ----------------------------
-- Table structure for commands_detail
-- ----------------------------
DROP TABLE IF EXISTS `commands_detail`;
CREATE TABLE `commands_detail` (
  `COMMAND_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `INTERNAL_STATE` longblob,
  UNIQUE KEY `COMMAND_ID` (`COMMAND_ID`) USING BTREE,
  KEY `IDX_COMMANDS_DETAIL_ID` (`COMMAND_ID`) USING BTREE,
  CONSTRAINT `commands_detail_ibfk_1` FOREIGN KEY (`COMMAND_ID`) REFERENCES `commands` (`COMMAND_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of commands_detail
-- ----------------------------
BEGIN;
INSERT INTO `commands_detail` VALUES (1, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238353936382C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373232303738392C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238353936392C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373232303738382C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (2, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363035382C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373232313130302C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363035382C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373232313130302C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (3, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363039332C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373232313936332C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363039332C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373232313936332C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (4, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363134392C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373232323839312C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363134392C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373232323839312C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (5, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363230302C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373232333834382C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363230302C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373232333834382C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (6, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363231392C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373232343231372C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363231392C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373232343231372C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (7, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363237322C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373232343431362C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363237322C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373232343431362C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (8, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363334332C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373232343633392C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363334332C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373232343633392C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (9, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363432392C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373236343938302C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363432392C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373236343938302C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (10, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363532352C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373238333232362C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238363532352C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373238333232362C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (11, 0, NULL);
INSERT INTO `commands_detail` VALUES (12, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238373838322C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635303634373238373635372C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635303634373238373838322C226F7574707574223A322C22737461727454696D657374616D70223A313635303634373238373635372C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (13, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635373830353730333937342C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635373830353638383839362C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635373830353730333937342C226F7574707574223A322C22737461727454696D657374616D70223A313635373830353638383839352C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
INSERT INTO `commands_detail` VALUES (14, 0, NULL);
INSERT INTO `commands_detail` VALUES (15, 2, 0x7B22726F6F74223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A312C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E536571436D64576F726B222C22406964223A322C2263616C6C6261636B223A6E756C6C2C226375727253746570223A312C2266696E616C6C7953746570223A6E756C6C2C227374657073223A5B7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E436D6453746570222C22406964223A332C226465736372697074696F6E223A6E756C6C2C2269676E6F72654661696C757265223A66616C73652C2274696D656F7574223A302C22776F726B223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E736572766963652E636F6E6669672E50726F636573735374616C656E657373436865636B436D64576F726B222C22406964223A347D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635373830353730393437302C226F7574707574223A7B2240636C617373223A22636F6D2E636C6F75646572612E636D662E636F6D6D616E642E666C6F772E4261736963576F726B4F7574707574222C22406964223A352C226D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D2C2274797065223A2253554343455353227D2C22737461727454696D657374616D70223A313635373830353730393337322C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D5D7D2C226368696C64436D6473223A5B5D2C22636F6E74657874456E746974696573223A5B5D2C22656E6454696D657374616D70223A313635373830353730393437302C226F7574707574223A322C22737461727454696D657374616D70223A313635373830353730393337312C22737461747573223A22444F4E45222C2274696D65644F7574223A66616C73657D2C22626167223A7B7D2C226661696C7572654D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E6661696C757265227D2C2270656E64696E6741626F7274223A66616C73652C22737563636573734D7367223A7B2261726773223A5B5D2C226D6573736167654964223A226D6573736167652E636F6D6D616E642E636F6E6669675374616C656E657373436865636B2E73756363657373227D7D);
COMMIT;

-- ----------------------------
-- Table structure for config_containers
-- ----------------------------
DROP TABLE IF EXISTS `config_containers`;
CREATE TABLE `config_containers` (
  `CONFIG_CONTAINER_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `CONFIG_TYPE` varchar(255) NOT NULL,
  `CONFIG_GENERATION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CONFIG_CONTAINER_ID`) USING BTREE,
  UNIQUE KEY `CONFIG_TYPE` (`CONFIG_TYPE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of config_containers
-- ----------------------------
BEGIN;
INSERT INTO `config_containers` VALUES (1, 1, 'ALL_HOSTS', 0);
INSERT INTO `config_containers` VALUES (2, 4, 'SCM', 0);
COMMIT;

-- ----------------------------
-- Table structure for configs
-- ----------------------------
DROP TABLE IF EXISTS `configs`;
CREATE TABLE `configs` (
  `CONFIG_ID` bigint(20) NOT NULL,
  `ROLE_ID` bigint(20) DEFAULT NULL,
  `ATTR` varchar(255) NOT NULL,
  `VALUE` longtext,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  `HOST_ID` bigint(20) DEFAULT NULL,
  `CONFIG_CONTAINER_ID` bigint(20) DEFAULT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `ROLE_CONFIG_GROUP_ID` bigint(20) DEFAULT NULL,
  `CONTEXT` varchar(255) DEFAULT NULL,
  `EXTERNAL_ACCOUNT_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`CONFIG_ID`) USING BTREE,
  KEY `FK_CONFIG_ROLE` (`ROLE_ID`) USING BTREE,
  KEY `FK_CONFIG_SERVICE` (`SERVICE_ID`) USING BTREE,
  KEY `IDX_CONFIG_HOST` (`HOST_ID`) USING BTREE,
  KEY `IDX_CONFIG_CONFIG_CONTAINER` (`CONFIG_CONTAINER_ID`) USING BTREE,
  KEY `IDX_CONFIG_ROLE_CONFIG_GROUP` (`ROLE_CONFIG_GROUP_ID`) USING BTREE,
  KEY `IDX_CONFIG_EXTERNAL_ACCOUNT` (`EXTERNAL_ACCOUNT_ID`) USING BTREE,
  CONSTRAINT `configs_ibfk_1` FOREIGN KEY (`CONFIG_CONTAINER_ID`) REFERENCES `config_containers` (`CONFIG_CONTAINER_ID`),
  CONSTRAINT `configs_ibfk_2` FOREIGN KEY (`EXTERNAL_ACCOUNT_ID`) REFERENCES `external_accounts` (`EXTERNAL_ACCOUNT_ID`),
  CONSTRAINT `configs_ibfk_3` FOREIGN KEY (`HOST_ID`) REFERENCES `hosts` (`HOST_ID`),
  CONSTRAINT `configs_ibfk_4` FOREIGN KEY (`ROLE_ID`) REFERENCES `roles` (`ROLE_ID`),
  CONSTRAINT `configs_ibfk_5` FOREIGN KEY (`ROLE_CONFIG_GROUP_ID`) REFERENCES `role_config_groups` (`ROLE_CONFIG_GROUP_ID`),
  CONSTRAINT `configs_ibfk_6` FOREIGN KEY (`SERVICE_ID`) REFERENCES `services` (`SERVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of configs
-- ----------------------------
BEGIN;
INSERT INTO `configs` VALUES (1, NULL, 'remote_parcel_repo_urls', 'https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh5/parcels/5.16/,https://parcels.repos.intel.com/mkl/latest,https://archive.cloudera.com/accumulo-c5/parcels/latest/,https://archive.cloudera.com/accumulo6/6.1/parcels/,https://archive.cloudera.com/kafka/parcels/latest/,http://archive.cloudera.com/kudu/parcels/latest/,https://archive.cloudera.com/spark/parcels/latest/,https://archive.cloudera.com/sqoop-teradata-connector1/latest/,https://archive.cloudera.com/sqoop-netezza-connector1/latest/,https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 2, 6, NULL, 'NONE', NULL);
INSERT INTO `configs` VALUES (2, NULL, 'public_cloud_status', 'NOT_ON_PUBLIC_CLOUD', NULL, NULL, 2, 0, NULL, 'NONE', NULL);
INSERT INTO `configs` VALUES (3, NULL, 'cluster_stats_start', '10/22/2012 0:00', NULL, NULL, 2, 0, NULL, 'NONE', NULL);
COMMIT;

-- ----------------------------
-- Table structure for configs_aud
-- ----------------------------
DROP TABLE IF EXISTS `configs_aud`;
CREATE TABLE `configs_aud` (
  `CONFIG_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  `ATTR` varchar(255) DEFAULT NULL,
  `VALUE` longtext,
  `ROLE_ID` bigint(20) DEFAULT NULL,
  `ROLE_CONFIG_GROUP_ID` bigint(20) DEFAULT NULL,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  `HOST_ID` bigint(20) DEFAULT NULL,
  `CONFIG_CONTAINER_ID` bigint(20) DEFAULT NULL,
  `EXTERNAL_ACCOUNT_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`CONFIG_ID`,`REV`) USING BTREE,
  KEY `FK_CONFIG_REVISION_START` (`REV`) USING BTREE,
  CONSTRAINT `configs_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of configs_aud
-- ----------------------------
BEGIN;
INSERT INTO `configs_aud` VALUES (1, 1, 0, 'remote_parcel_repo_urls', 'https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh5/parcels/5.16/,https://parcels.repos.intel.com/mkl/latest,https://archive.cloudera.com/accumulo-c5/parcels/latest/', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `configs_aud` VALUES (1, 2, 1, 'remote_parcel_repo_urls', 'https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh5/parcels/5.16/,https://parcels.repos.intel.com/mkl/latest,https://archive.cloudera.com/accumulo-c5/parcels/latest/,https://archive.cloudera.com/accumulo6/6.1/parcels/', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `configs_aud` VALUES (1, 3, 1, 'remote_parcel_repo_urls', 'https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh5/parcels/5.16/,https://parcels.repos.intel.com/mkl/latest,https://archive.cloudera.com/accumulo-c5/parcels/latest/,https://archive.cloudera.com/accumulo6/6.1/parcels/,https://archive.cloudera.com/kafka/parcels/latest/', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `configs_aud` VALUES (1, 4, 1, 'remote_parcel_repo_urls', 'https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh5/parcels/5.16/,https://parcels.repos.intel.com/mkl/latest,https://archive.cloudera.com/accumulo-c5/parcels/latest/,https://archive.cloudera.com/accumulo6/6.1/parcels/,https://archive.cloudera.com/kafka/parcels/latest/,http://archive.cloudera.com/kudu/parcels/latest/', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `configs_aud` VALUES (1, 5, 1, 'remote_parcel_repo_urls', 'https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh5/parcels/5.16/,https://parcels.repos.intel.com/mkl/latest,https://archive.cloudera.com/accumulo-c5/parcels/latest/,https://archive.cloudera.com/accumulo6/6.1/parcels/,https://archive.cloudera.com/kafka/parcels/latest/,http://archive.cloudera.com/kudu/parcels/latest/,https://archive.cloudera.com/spark/parcels/latest/', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `configs_aud` VALUES (1, 6, 1, 'remote_parcel_repo_urls', 'https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh5/parcels/5.16/,https://parcels.repos.intel.com/mkl/latest,https://archive.cloudera.com/accumulo-c5/parcels/latest/,https://archive.cloudera.com/accumulo6/6.1/parcels/,https://archive.cloudera.com/kafka/parcels/latest/,http://archive.cloudera.com/kudu/parcels/latest/,https://archive.cloudera.com/spark/parcels/latest/,https://archive.cloudera.com/sqoop-teradata-connector1/latest/,https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `configs_aud` VALUES (1, 7, 1, 'remote_parcel_repo_urls', 'https://archive.cloudera.com/cdh6/{latest_supported}/parcels/,https://archive.cloudera.com/cdh5/parcels/5.16/,https://parcels.repos.intel.com/mkl/latest,https://archive.cloudera.com/accumulo-c5/parcels/latest/,https://archive.cloudera.com/accumulo6/6.1/parcels/,https://archive.cloudera.com/kafka/parcels/latest/,http://archive.cloudera.com/kudu/parcels/latest/,https://archive.cloudera.com/spark/parcels/latest/,https://archive.cloudera.com/sqoop-teradata-connector1/latest/,https://archive.cloudera.com/sqoop-netezza-connector1/latest/,https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `configs_aud` VALUES (2, 8, 0, 'public_cloud_status', 'NOT_ON_PUBLIC_CLOUD', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `configs_aud` VALUES (3, 10, 0, 'cluster_stats_start', '10/22/2012 0:00', NULL, NULL, NULL, NULL, 2, NULL);
COMMIT;

-- ----------------------------
-- Table structure for credentials
-- ----------------------------
DROP TABLE IF EXISTS `credentials`;
CREATE TABLE `credentials` (
  `CREDENTIAL_ID` bigint(20) NOT NULL,
  `PRINCIPAL` varchar(255) NOT NULL,
  `KEYTAB` mediumblob NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`CREDENTIAL_ID`) USING BTREE,
  UNIQUE KEY `PRINCIPAL` (`PRINCIPAL`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of credentials
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_context_to_base_service
-- ----------------------------
DROP TABLE IF EXISTS `data_context_to_base_service`;
CREATE TABLE `data_context_to_base_service` (
  `DATA_CONTEXT_ID` bigint(20) NOT NULL,
  `SERVICE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`DATA_CONTEXT_ID`,`SERVICE_ID`) USING BTREE,
  KEY `FK_DATA_CONTEXT_TO_SERVICE_ID_SI` (`SERVICE_ID`) USING BTREE,
  CONSTRAINT `data_context_to_base_service_ibfk_1` FOREIGN KEY (`DATA_CONTEXT_ID`) REFERENCES `data_contexts` (`DATA_CONTEXT_ID`),
  CONSTRAINT `data_context_to_base_service_ibfk_2` FOREIGN KEY (`SERVICE_ID`) REFERENCES `services` (`SERVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of data_context_to_base_service
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for data_contexts
-- ----------------------------
DROP TABLE IF EXISTS `data_contexts`;
CREATE TABLE `data_contexts` (
  `DATA_CONTEXT_ID` bigint(20) NOT NULL,
  `UUID` varchar(255) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `DISPLAY_NAME` varchar(255) NOT NULL,
  `NAMESERVICE` varchar(255) DEFAULT NULL,
  `CREATED_INSTANT` bigint(20) NOT NULL,
  `LAST_MODIFIED_INSTANT` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`DATA_CONTEXT_ID`) USING BTREE,
  UNIQUE KEY `UUID` (`UUID`) USING BTREE,
  UNIQUE KEY `NAME` (`NAME`) USING BTREE,
  UNIQUE KEY `DISPLAY_NAME` (`DISPLAY_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of data_contexts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for diagnostics_events
-- ----------------------------
DROP TABLE IF EXISTS `diagnostics_events`;
CREATE TABLE `diagnostics_events` (
  `EVENT_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `EVENT_NAME` varchar(64) NOT NULL,
  `EVENT_TYPE` varchar(32) NOT NULL,
  `EVENT_TIME` bigint(20) NOT NULL,
  `DETAILS` mediumtext,
  PRIMARY KEY (`EVENT_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of diagnostics_events
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for external_accounts
-- ----------------------------
DROP TABLE IF EXISTS `external_accounts`;
CREATE TABLE `external_accounts` (
  `EXTERNAL_ACCOUNT_ID` bigint(20) NOT NULL,
  `TYPE_NAME` varchar(255) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `DISPLAY_NAME` varchar(255) NOT NULL,
  `CREATED_INSTANT` bigint(20) NOT NULL,
  `LAST_MODIFIED_INSTANT` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`EXTERNAL_ACCOUNT_ID`) USING BTREE,
  UNIQUE KEY `UNIQUE_EXTERNAL_ACCOUNTS_NAME` (`NAME`) USING BTREE,
  UNIQUE KEY `UNIQUE_EXTERNAL_ACCOUNTS_DISPLAY_NAME` (`DISPLAY_NAME`) USING BTREE,
  KEY `IDX_EXTERNAL_ACCOUNTS_TYPE_NAME` (`TYPE_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of external_accounts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for external_accounts_aud
-- ----------------------------
DROP TABLE IF EXISTS `external_accounts_aud`;
CREATE TABLE `external_accounts_aud` (
  `EXTERNAL_ACCOUNT_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  `TYPE_NAME` varchar(255) DEFAULT NULL,
  `NAME` varchar(255) DEFAULT NULL,
  `DISPLAY_NAME` varchar(255) DEFAULT NULL,
  `CREATED_INSTANT` bigint(20) DEFAULT NULL,
  `LAST_MODIFIED_INSTANT` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`EXTERNAL_ACCOUNT_ID`,`REV`) USING BTREE,
  KEY `IDX_REV` (`REV`) USING BTREE,
  CONSTRAINT `external_accounts_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of external_accounts_aud
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for external_mapping_auth_roles
-- ----------------------------
DROP TABLE IF EXISTS `external_mapping_auth_roles`;
CREATE TABLE `external_mapping_auth_roles` (
  `EXTERNAL_MAPPING_ID` bigint(20) NOT NULL,
  `AUTH_ROLE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`EXTERNAL_MAPPING_ID`,`AUTH_ROLE_ID`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_EXT_AUTH` (`EXTERNAL_MAPPING_ID`,`AUTH_ROLE_ID`) USING BTREE,
  KEY `FK_E_AUTH_ROLE_ID` (`AUTH_ROLE_ID`) USING BTREE,
  KEY `FK_AUTH_EXTERNAL_ID` (`EXTERNAL_MAPPING_ID`) USING BTREE,
  CONSTRAINT `external_mapping_auth_roles_ibfk_1` FOREIGN KEY (`EXTERNAL_MAPPING_ID`) REFERENCES `external_mappings` (`EXTERNAL_MAPPING_ID`),
  CONSTRAINT `external_mapping_auth_roles_ibfk_2` FOREIGN KEY (`AUTH_ROLE_ID`) REFERENCES `auth_roles` (`AUTH_ROLE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of external_mapping_auth_roles
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for external_mappings
-- ----------------------------
DROP TABLE IF EXISTS `external_mappings`;
CREATE TABLE `external_mappings` (
  `EXTERNAL_MAPPING_ID` bigint(20) NOT NULL,
  `UUID` varchar(255) NOT NULL,
  `CODE` varchar(255) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `EXTERNAL_MAPPING_TYPE` varchar(255) NOT NULL,
  PRIMARY KEY (`EXTERNAL_MAPPING_ID`) USING BTREE,
  UNIQUE KEY `IDX_EXT_MAP` (`CODE`,`EXTERNAL_MAPPING_TYPE`) USING BTREE,
  KEY `IDX_EXTERNAL_MAPPINGS_TYPE` (`EXTERNAL_MAPPING_TYPE`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of external_mappings
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for global_settings
-- ----------------------------
DROP TABLE IF EXISTS `global_settings`;
CREATE TABLE `global_settings` (
  `GLOBAL_SETTING_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `ATTR` varchar(255) NOT NULL,
  `VALUE` longtext NOT NULL,
  PRIMARY KEY (`GLOBAL_SETTING_ID`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_GLOBAL_SETTING` (`ATTR`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of global_settings
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for host_template_to_role_conf_grp
-- ----------------------------
DROP TABLE IF EXISTS `host_template_to_role_conf_grp`;
CREATE TABLE `host_template_to_role_conf_grp` (
  `HOST_TEMPLATE_ID` bigint(20) NOT NULL,
  `ROLE_CONFIG_GROUP_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`HOST_TEMPLATE_ID`,`ROLE_CONFIG_GROUP_ID`) USING BTREE,
  KEY `IDX_HOST_TEMPL_TO_RCG_HOST_TMP` (`HOST_TEMPLATE_ID`) USING BTREE,
  KEY `IDX_HOST_TEMPL_TO_RCG_RCG` (`ROLE_CONFIG_GROUP_ID`) USING BTREE,
  CONSTRAINT `host_template_to_role_conf_grp_ibfk_1` FOREIGN KEY (`HOST_TEMPLATE_ID`) REFERENCES `host_templates` (`HOST_TEMPLATE_ID`),
  CONSTRAINT `host_template_to_role_conf_grp_ibfk_2` FOREIGN KEY (`ROLE_CONFIG_GROUP_ID`) REFERENCES `role_config_groups` (`ROLE_CONFIG_GROUP_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of host_template_to_role_conf_grp
-- ----------------------------
BEGIN;
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (407, 'REPORTSMANAGER', 'mgmt-REPORTSMANAGER-BASE', 0, b'1', 'Reports Manager Default Group', 1);
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (408, 'EVENTSERVER', 'mgmt-EVENTSERVER-BASE', 3, b'1', 'Event Server Default Group', 1);
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (409, 'ACTIVITYMONITOR', 'mgmt-ACTIVITYMONITOR-BASE', 0, b'1', 'Activity Monitor Default Group', 1);
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (410, 'HOSTMONITOR', 'mgmt-HOSTMONITOR-BASE', 3, b'1', 'Host Monitor Default Group', 1);
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (411, 'NAVIGATORMETASERVER', 'mgmt-NAVIGATORMETASERVER-BASE', 0, b'1', 'Navigator Metadata Server Default Group', 1);
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (412, 'TELEMETRYPUBLISHER', 'mgmt-TELEMETRYPUBLISHER-BASE', 0, b'1', 'Telemetry Publisher Default Group', 1);
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (413, 'ALERTPUBLISHER', 'mgmt-ALERTPUBLISHER-BASE', 3, b'1', 'Alert Publisher Default Group', 1);
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (414, 'NAVIGATOR', 'mgmt-NAVIGATOR-BASE', 0, b'1', 'Navigator Audit Server Default Group', 1);
INSERT INTO `cmf`.`role_config_groups` (`ROLE_CONFIG_GROUP_ID`, `ROLE_TYPE`, `NAME`, `OPTIMISTIC_LOCK_VERSION`, `BASE`, `DISPLAY_NAME`, `SERVICE_ID`) VALUES (415, 'SERVICEMONITOR', 'mgmt-SERVICEMONITOR-BASE', 3, b'1', 'Service Monitor Default Group', 1);
COMMIT;

-- ----------------------------
-- Table structure for host_templates
-- ----------------------------
DROP TABLE IF EXISTS `host_templates`;
CREATE TABLE `host_templates` (
  `HOST_TEMPLATE_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `CLUSTER_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`HOST_TEMPLATE_ID`) USING BTREE,
  UNIQUE KEY `NAME` (`NAME`) USING BTREE,
  KEY `IDX_HOST_TEMPLATE_CLUSTER` (`CLUSTER_ID`) USING BTREE,
  CONSTRAINT `host_templates_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of host_templates
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for hosts
-- ----------------------------
DROP TABLE IF EXISTS `hosts`;
CREATE TABLE `hosts` (
  `HOST_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `HOST_IDENTIFIER` varchar(255) NOT NULL,
  `NAME` varchar(255) DEFAULT NULL,
  `IP_ADDRESS` varchar(255) DEFAULT NULL,
  `RACK_ID` varchar(255) DEFAULT NULL,
  `STATUS` varchar(255) DEFAULT NULL,
  `CONFIG_CONTAINER_ID` bigint(20) DEFAULT NULL,
  `MAINTENANCE_COUNT` int(11) NOT NULL DEFAULT '0',
  `DECOMMISSION_COUNT` int(11) NOT NULL DEFAULT '0',
  `CLUSTER_ID` bigint(20) DEFAULT NULL,
  `NUM_CORES` bigint(20) DEFAULT NULL,
  `TOTAL_PHYS_MEM_BYTES` bigint(20) DEFAULT NULL,
  `PUBLIC_NAME` varchar(255) DEFAULT NULL,
  `PUBLIC_IP_ADDRESS` varchar(255) DEFAULT NULL,
  `CLOUD_PROVIDER` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`HOST_ID`) USING BTREE,
  UNIQUE KEY `HOST_IDENTIFIER` (`HOST_IDENTIFIER`) USING BTREE,
  KEY `IDX_HOST_CONFIG_CONTAINER` (`CONFIG_CONTAINER_ID`) USING BTREE,
  KEY `IDX_HOST_CLUSTER` (`CLUSTER_ID`) USING BTREE,
  CONSTRAINT `hosts_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`),
  CONSTRAINT `hosts_ibfk_2` FOREIGN KEY (`CONFIG_CONTAINER_ID`) REFERENCES `config_containers` (`CONFIG_CONTAINER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of hosts
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for hosts_aud
-- ----------------------------
DROP TABLE IF EXISTS `hosts_aud`;
CREATE TABLE `hosts_aud` (
  `HOST_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  `HOST_IDENTIFIER` varchar(255) DEFAULT NULL,
  `NAME` varchar(255) DEFAULT NULL,
  `CLUSTER_ID` bigint(20) DEFAULT NULL,
  `CONFIG_CONTAINER_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`HOST_ID`,`REV`) USING BTREE,
  KEY `FK_HOST_REVISION_START` (`REV`) USING BTREE,
  CONSTRAINT `hosts_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of hosts_aud
-- ----------------------------
BEGIN;
INSERT INTO `hosts_aud` VALUES (1, 11, 0, 'f191983e-7f94-4dc9-a616-457ac0e45aab', 'cdh6-master-1', NULL, 1);
INSERT INTO `hosts_aud` VALUES (1, 13, 0, 'dfe4b23d-367b-4985-8b06-b3326b0201cc', 'emr-worker-1', NULL, 1);
COMMIT;

-- ----------------------------
-- Table structure for metrics
-- ----------------------------
DROP TABLE IF EXISTS `metrics`;
CREATE TABLE `metrics` (
  `METRIC_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `METRIC_IDENTIFIER` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `METRIC` longtext,
  PRIMARY KEY (`METRIC_ID`) USING BTREE,
  UNIQUE KEY `METRIC_IDENTIFIER` (`METRIC_IDENTIFIER`) USING BTREE,
  UNIQUE KEY `NAME` (`NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of metrics
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for parcel_components
-- ----------------------------
DROP TABLE IF EXISTS `parcel_components`;
CREATE TABLE `parcel_components` (
  `PARCEL_ID` bigint(20) NOT NULL,
  `VERSION` varchar(255) NOT NULL,
  `COMPONENT_NAME` varchar(255) NOT NULL,
  PRIMARY KEY (`PARCEL_ID`,`COMPONENT_NAME`) USING BTREE,
  KEY `IDX_COMPONENT_PARCEL` (`PARCEL_ID`) USING BTREE,
  CONSTRAINT `parcel_components_ibfk_1` FOREIGN KEY (`PARCEL_ID`) REFERENCES `parcels` (`PARCEL_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of parcel_components
-- ----------------------------
BEGIN;
INSERT INTO `parcel_components` VALUES (1, '2022.0.2.136', 'linux');
INSERT INTO `parcel_components` VALUES (2, '1.4.0-cdh5.12.2', 'kudu');
INSERT INTO `parcel_components` VALUES (3, '1.4.0-cdh5.12.2', 'kudu');
INSERT INTO `parcel_components` VALUES (4, '1.4.0-cdh5.12.2', 'kudu');
INSERT INTO `parcel_components` VALUES (5, '1.4.0-cdh5.12.2', 'kudu');
INSERT INTO `parcel_components` VALUES (6, '1.4.0-cdh5.12.2', 'kudu');
INSERT INTO `parcel_components` VALUES (7, '1.4.0-cdh5.12.2', 'kudu');
COMMIT;

-- ----------------------------
-- Table structure for parcels
-- ----------------------------
DROP TABLE IF EXISTS `parcels`;
CREATE TABLE `parcels` (
  `PARCEL_ID` bigint(20) NOT NULL,
  `PRODUCT` varchar(255) NOT NULL,
  `VERSION` varchar(255) NOT NULL,
  `OS` varchar(255) NOT NULL,
  `FILENAME` varchar(255) NOT NULL,
  `HASH` varchar(255) DEFAULT NULL,
  `BINARY_DIFF` bit(1) DEFAULT NULL,
  `STATUS` varchar(255) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `SOURCE` varchar(4000) DEFAULT NULL,
  `RELEASE_INSTANT` bigint(20) DEFAULT NULL,
  `DOWNLOAD_INSTANT` bigint(20) DEFAULT NULL,
  `RELEASE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`PARCEL_ID`) USING BTREE,
  UNIQUE KEY `FILENAME` (`FILENAME`) USING BTREE,
  KEY `IDX_PARCEL_RELEASE` (`RELEASE_ID`) USING BTREE,
  CONSTRAINT `parcels_ibfk_1` FOREIGN KEY (`RELEASE_ID`) REFERENCES `releases` (`RELEASE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of parcels
-- ----------------------------
BEGIN;
INSERT INTO `parcels` VALUES (1, 'mkl', '2022.0.2.136', 'el7', 'mkl-2022.0.2.136-el7.parcel', '6161ce5cb5882bfb8d14d2990a7b041ab9a6ea19', b'0', 'AVAILABLE_REMOTELY', 0, 'https://parcels.repos.intel.com/mkl/latest', NULL, NULL, 1);
INSERT INTO `parcels` VALUES (2, 'KUDU', '1.4.0-1.cdh5.12.2.p0.8', 'el6', 'KUDU-1.4.0-1.cdh5.12.2.p0.8-el6.parcel', '4c7ab18786b48445c95096e52a66970b3ab2a01f', b'0', 'AVAILABLE_REMOTELY', 0, 'http://archive.cloudera.com/kudu/parcels/latest/', NULL, NULL, 2);
INSERT INTO `parcels` VALUES (3, 'KUDU', '1.4.0-1.cdh5.12.2.p0.8', 'el7', 'KUDU-1.4.0-1.cdh5.12.2.p0.8-el7.parcel', 'ab47d6fd4dfe864cf3ad66540b12b914358a21ec', b'0', 'AVAILABLE_REMOTELY', 0, 'http://archive.cloudera.com/kudu/parcels/latest/', NULL, NULL, 2);
INSERT INTO `parcels` VALUES (4, 'KUDU', '1.4.0-1.cdh5.12.2.p0.8', 'jessie', 'KUDU-1.4.0-1.cdh5.12.2.p0.8-jessie.parcel', 'fa685985ac56af8f9a97057e754ecc665e0543bb', b'0', 'AVAILABLE_REMOTELY', 0, 'http://archive.cloudera.com/kudu/parcels/latest/', NULL, NULL, 2);
INSERT INTO `parcels` VALUES (5, 'KUDU', '1.4.0-1.cdh5.12.2.p0.8', 'sles12', 'KUDU-1.4.0-1.cdh5.12.2.p0.8-sles12.parcel', '81d05b21f7e775e7657bbf592c4a49b8373b12f2', b'0', 'AVAILABLE_REMOTELY', 0, 'http://archive.cloudera.com/kudu/parcels/latest/', NULL, NULL, 2);
INSERT INTO `parcels` VALUES (6, 'KUDU', '1.4.0-1.cdh5.12.2.p0.8', 'trusty', 'KUDU-1.4.0-1.cdh5.12.2.p0.8-trusty.parcel', '1953ea1966784b769918afcd94d06ac5a63a275e', b'0', 'AVAILABLE_REMOTELY', 0, 'http://archive.cloudera.com/kudu/parcels/latest/', NULL, NULL, 2);
INSERT INTO `parcels` VALUES (7, 'KUDU', '1.4.0-1.cdh5.12.2.p0.8', 'xenial', 'KUDU-1.4.0-1.cdh5.12.2.p0.8-xenial.parcel', 'c715a2c7a4d10b881c1a4e3456f5df3127ad6c62', b'0', 'AVAILABLE_REMOTELY', 0, 'http://archive.cloudera.com/kudu/parcels/latest/', NULL, NULL, 2);
INSERT INTO `parcels` VALUES (8, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', 'el5', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c6-el5.parcel', '33f26fda3dbbab8b8f36cb2e24f608e9003f5137', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, 3);
INSERT INTO `parcels` VALUES (9, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', 'el6', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c6-el6.parcel', 'a4d22e86ba0491264bde3dec8099e7035a8b87e2', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, 3);
INSERT INTO `parcels` VALUES (10, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', 'el7', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c6-el7.parcel', 'c415feb0e34f9e63e7e0abe19ac49da21957a2d4', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, 3);
INSERT INTO `parcels` VALUES (11, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', 'precise', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c6-precise.parcel', '6cbfbb1efd557c7e89ff0b0b07a941bc8cdf7218', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, 3);
INSERT INTO `parcels` VALUES (12, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', 'sles11', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c6-sles11.parcel', '4ecf83646a0a2018ad1ad6ef6883a6c1ac1af50a', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, 3);
INSERT INTO `parcels` VALUES (13, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', 'sles12', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c6-sles12.parcel', 'c3aeabeb4ec3c6c6f53b7ab7c198ceb241165975', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, 3);
INSERT INTO `parcels` VALUES (14, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', 'trusty', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c6-trusty.parcel', '16b16b828c2d9a61ea7b4ac5be899a64326d4344', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, 3);
INSERT INTO `parcels` VALUES (15, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', 'wheezy', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c6-wheezy.parcel', 'ecca5dc68b53dc2970578a2100ca2a9eff691114', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-netezza-connector1/latest/', NULL, NULL, 3);
INSERT INTO `parcels` VALUES (16, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', 'el5', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c5-el5.parcel', 'd79ebba9cdcc0259f8478c47d22e41e77d62731c', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 4);
INSERT INTO `parcels` VALUES (17, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', 'el6', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c5-el6.parcel', '506f3b0c74cd4c7c0548742bd452191a0495e534', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 4);
INSERT INTO `parcels` VALUES (18, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', 'el7', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c5-el7.parcel', '146135a1d080ae4cceced019e2843508223a57a8', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 4);
INSERT INTO `parcels` VALUES (19, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', 'precise', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c5-precise.parcel', '23c511aec0c4627038f9bdbe557ad83f9a53a1ba', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 4);
INSERT INTO `parcels` VALUES (20, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', 'sles11', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c5-sles11.parcel', 'b33efcf677d05fa3a5d58be83407649b57de4378', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 4);
INSERT INTO `parcels` VALUES (21, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', 'sles12', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c5-sles12.parcel', '44860f4cce97cf9dd1866ded816d66fba8cf22b2', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 4);
INSERT INTO `parcels` VALUES (22, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', 'trusty', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c5-trusty.parcel', 'aae5635e37e8acda89c8cf9a4946140781ea81ec', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 4);
INSERT INTO `parcels` VALUES (23, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', 'wheezy', 'SQOOP_NETEZZA_CONNECTOR-1.5.1c5-wheezy.parcel', 'e095c133e4ba6dae3abbab347f3e5b16305ec86f', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 4);
INSERT INTO `parcels` VALUES (24, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', 'el5', 'SQOOP_TERADATA_CONNECTOR-1.7c5-el5.parcel', '6ce7a5fd70a35671d423d9a775b81efe499bc0b3', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 5);
INSERT INTO `parcels` VALUES (25, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', 'el6', 'SQOOP_TERADATA_CONNECTOR-1.7c5-el6.parcel', '324981287de98e9917950e2a2c622864387930dd', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 5);
INSERT INTO `parcels` VALUES (26, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', 'el7', 'SQOOP_TERADATA_CONNECTOR-1.7c5-el7.parcel', '6174e77a0910c1ab696a40d0ab169e753ed01207', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 5);
INSERT INTO `parcels` VALUES (27, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', 'precise', 'SQOOP_TERADATA_CONNECTOR-1.7c5-precise.parcel', '99e332cb35733e72b2fb11393a992adcb3f75aee', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 5);
INSERT INTO `parcels` VALUES (28, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', 'sles11', 'SQOOP_TERADATA_CONNECTOR-1.7c5-sles11.parcel', '9768c8ef619d74780e851ce90fa391f42869c22a', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 5);
INSERT INTO `parcels` VALUES (29, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', 'sles12', 'SQOOP_TERADATA_CONNECTOR-1.7c5-sles12.parcel', 'ad93511e8c63ebd2b69f14b864dddb0349c50c34', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 5);
INSERT INTO `parcels` VALUES (30, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', 'trusty', 'SQOOP_TERADATA_CONNECTOR-1.7c5-trusty.parcel', '31c953491ab329a7493f9732274fb8b8d4db3e30', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 5);
INSERT INTO `parcels` VALUES (31, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', 'wheezy', 'SQOOP_TERADATA_CONNECTOR-1.7c5-wheezy.parcel', 'ba8f614bcce0c3526bf043df5d5a3b615a39a351', b'0', 'AVAILABLE_REMOTELY', 0, 'https://archive.cloudera.com/sqoop-connectors/parcels/latest/', NULL, NULL, 5);
INSERT INTO `parcels` VALUES (32, 'CDH', '6.3.1-1.cdh6.3.1.p0.1470567', 'el7', 'CDH-6.3.1-1.cdh6.3.1.p0.1470567-el7.parcel', '9955cf590d67baa4fe7462bf319db695cae35efc', b'0', 'AVAILABLE', 0, NULL, NULL, NULL, 6);
COMMIT;

-- ----------------------------
-- Table structure for process_active_releases
-- ----------------------------
DROP TABLE IF EXISTS `process_active_releases`;
CREATE TABLE `process_active_releases` (
  `PROCESS_ID` bigint(20) NOT NULL,
  `RELEASE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`PROCESS_ID`,`RELEASE_ID`) USING BTREE,
  KEY `IDX_PROC_ACTV_RLS_PROC` (`PROCESS_ID`) USING BTREE,
  KEY `IDX_PROC_ACTV_RLS_RLS` (`RELEASE_ID`) USING BTREE,
  CONSTRAINT `process_active_releases_ibfk_1` FOREIGN KEY (`PROCESS_ID`) REFERENCES `processes` (`PROCESS_ID`),
  CONSTRAINT `process_active_releases_ibfk_2` FOREIGN KEY (`RELEASE_ID`) REFERENCES `releases` (`RELEASE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of process_active_releases
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for processes
-- ----------------------------
DROP TABLE IF EXISTS `processes`;
CREATE TABLE `processes` (
  `PROCESS_ID` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `ROLE_ID` bigint(20) DEFAULT NULL,
  `COMMAND_ID` bigint(20) DEFAULT NULL,
  `HOST_ID` bigint(20) NOT NULL,
  `PROCESS_USER` varchar(255) DEFAULT NULL,
  `PROCESS_GROUP` varchar(255) DEFAULT NULL,
  `PROGRAM` varchar(255) DEFAULT NULL,
  `ARGUMENTS` longtext,
  `RUNNING` bit(1) DEFAULT NULL,
  `RUN_GENERATION` bigint(20) DEFAULT NULL,
  `ONE_OFF` bit(1) DEFAULT NULL,
  `STATUS_LINKS` longtext,
  `RESOURCES` longtext,
  `ENVIRONMENT` longtext,
  `CREATED_INSTANT` bigint(20) NOT NULL DEFAULT '0',
  `SPECIAL_FILE_INFO` longtext,
  `AUTO_RESTART` bit(1) NOT NULL DEFAULT b'1',
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `UPDATED_INSTANT` bigint(20) NOT NULL,
  `REQUIRED_PARCEL_TAGS` longtext NOT NULL,
  `OPTIONAL_PARCEL_TAGS` longtext NOT NULL,
  `CONFIG_GENERATION` bigint(20) NOT NULL,
  `EXTRA_GROUPS` longtext NOT NULL,
  `START_SECS` int(11) DEFAULT NULL,
  `EXIT_CODES` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`PROCESS_ID`) USING BTREE,
  KEY `FK_PROCESS_HOST` (`HOST_ID`) USING BTREE,
  KEY `FK_PROCESS_ROLE` (`ROLE_ID`) USING BTREE,
  KEY `FK_PROCESS_COMMAND` (`COMMAND_ID`) USING BTREE,
  CONSTRAINT `processes_ibfk_1` FOREIGN KEY (`COMMAND_ID`) REFERENCES `commands` (`COMMAND_ID`),
  CONSTRAINT `processes_ibfk_2` FOREIGN KEY (`HOST_ID`) REFERENCES `hosts` (`HOST_ID`),
  CONSTRAINT `processes_ibfk_3` FOREIGN KEY (`ROLE_ID`) REFERENCES `roles` (`ROLE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of processes
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for processes_detail
-- ----------------------------
DROP TABLE IF EXISTS `processes_detail`;
CREATE TABLE `processes_detail` (
  `PROCESS_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `CONFIGURATION_DATA` mediumblob,
  `REFRESH_FILES` longtext,
  PRIMARY KEY (`PROCESS_ID`),
  UNIQUE KEY `PROCESS_ID` (`PROCESS_ID`) USING BTREE,
  KEY `IDX_PROCESSES_DETAIL_ID` (`PROCESS_ID`) USING BTREE,
  CONSTRAINT `processes_detail_ibfk_1` FOREIGN KEY (`PROCESS_ID`) REFERENCES `processes` (`PROCESS_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of processes_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for releases
-- ----------------------------
DROP TABLE IF EXISTS `releases`;
CREATE TABLE `releases` (
  `RELEASE_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `PRODUCT` varchar(255) NOT NULL,
  `VERSION` varchar(255) NOT NULL,
  `RELEASE_NOTES` longtext,
  `DEPENDS` longtext,
  `CONFLICTS` longtext,
  `REPLACES` longtext,
  `SERVICES_RESTART_INFO` mediumblob,
  PRIMARY KEY (`RELEASE_ID`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_RELEASE` (`PRODUCT`,`VERSION`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of releases
-- ----------------------------
BEGIN;
INSERT INTO `releases` VALUES (1, 0, 'mkl', '2022.0.2.136', NULL, NULL, NULL, NULL, 0x6E756C6C);
INSERT INTO `releases` VALUES (2, 0, 'KUDU', '1.4.0-1.cdh5.12.2.p0.8', NULL, NULL, NULL, NULL, 0x6E756C6C);
INSERT INTO `releases` VALUES (3, 0, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6', NULL, 'CDH (>= 6.0), CDH (<< 7.0)', NULL, NULL, 0x6E756C6C);
INSERT INTO `releases` VALUES (4, 0, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5', NULL, 'CDH (>= 5.0), CDH (<< 6.0)', NULL, NULL, 0x6E756C6C);
INSERT INTO `releases` VALUES (5, 0, 'SQOOP_TERADATA_CONNECTOR', '1.7c5', NULL, 'CDH (>= 5.0), CDH (<< 6.0)', NULL, NULL, 0x6E756C6C);
INSERT INTO `releases` VALUES (6, 0, 'CDH', '6.3.1-1.cdh6.3.1.p0.1470567', NULL, NULL, NULL, NULL, 0x6E756C6C);
COMMIT;

-- ----------------------------
-- Table structure for releases_aud
-- ----------------------------
DROP TABLE IF EXISTS `releases_aud`;
CREATE TABLE `releases_aud` (
  `RELEASE_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  `PRODUCT` varchar(255) DEFAULT NULL,
  `VERSION` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`RELEASE_ID`,`REV`) USING BTREE,
  KEY `FK_RELEASE_REVISION_START` (`REV`) USING BTREE,
  CONSTRAINT `releases_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of releases_aud
-- ----------------------------
BEGIN;
INSERT INTO `releases_aud` VALUES (1, 9, 0, 'mkl', '2022.0.2.136');
INSERT INTO `releases_aud` VALUES (2, 9, 0, 'KUDU', '1.4.0-1.cdh5.12.2.p0.8');
INSERT INTO `releases_aud` VALUES (3, 9, 0, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c6');
INSERT INTO `releases_aud` VALUES (4, 9, 0, 'SQOOP_NETEZZA_CONNECTOR', '1.5.1c5');
INSERT INTO `releases_aud` VALUES (5, 9, 0, 'SQOOP_TERADATA_CONNECTOR', '1.7c5');
INSERT INTO `releases_aud` VALUES (6, 12, 0, 'CDH', '6.3.1-1.cdh6.3.1.p0.1470567');
COMMIT;

-- ----------------------------
-- Table structure for revisions
-- ----------------------------
DROP TABLE IF EXISTS `revisions`;
CREATE TABLE `revisions` (
  `REVISION_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `USER_ID` bigint(20) DEFAULT NULL,
  `TIMESTAMP` bigint(20) DEFAULT NULL,
  `MESSAGE` longtext,
  PRIMARY KEY (`REVISION_ID`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of revisions
-- ----------------------------
BEGIN;
INSERT INTO `revisions` VALUES (1, 0, NULL, 1650647220763, NULL);
INSERT INTO `revisions` VALUES (2, 0, NULL, 1650647221065, NULL);
INSERT INTO `revisions` VALUES (3, 0, NULL, 1650647221953, NULL);
INSERT INTO `revisions` VALUES (4, 0, NULL, 1650647222886, NULL);
INSERT INTO `revisions` VALUES (5, 0, NULL, 1650647223842, NULL);
INSERT INTO `revisions` VALUES (6, 0, NULL, 1650647224208, NULL);
INSERT INTO `revisions` VALUES (7, 0, NULL, 1650647224409, NULL);
INSERT INTO `revisions` VALUES (8, 0, -1, 1650647264961, 'Wrote public cloud status');
INSERT INTO `revisions` VALUES (9, 0, NULL, 1650647269463, NULL);
INSERT INTO `revisions` VALUES (10, 0, -1, 1650647283221, 'Initialized diagnostic data schedule');
INSERT INTO `revisions` VALUES (11, 0, NULL, 1650647287653, NULL);
INSERT INTO `revisions` VALUES (12, 0, NULL, 1657805708957, NULL);
INSERT INTO `revisions` VALUES (13, 0, NULL, 1657805709363, NULL);
COMMIT;

-- ----------------------------
-- Table structure for role_config_groups
-- ----------------------------
DROP TABLE IF EXISTS `role_config_groups`;
CREATE TABLE `role_config_groups` (
  `ROLE_CONFIG_GROUP_ID` bigint(20) NOT NULL,
  `ROLE_TYPE` varchar(255) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `BASE` bit(1) NOT NULL DEFAULT b'0',
  `DISPLAY_NAME` varchar(255) NOT NULL,
  `SERVICE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`ROLE_CONFIG_GROUP_ID`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_ROLE_CONFIG_GROUP` (`NAME`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_RCG_DISP` (`DISPLAY_NAME`,`SERVICE_ID`) USING BTREE,
  KEY `FK_ROLE_CONFIG_GROUP_SERVICE` (`SERVICE_ID`) USING BTREE,
  CONSTRAINT `role_config_groups_ibfk_1` FOREIGN KEY (`SERVICE_ID`) REFERENCES `services` (`SERVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of role_config_groups
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for role_config_groups_aud
-- ----------------------------
DROP TABLE IF EXISTS `role_config_groups_aud`;
CREATE TABLE `role_config_groups_aud` (
  `ROLE_CONFIG_GROUP_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  `ROLE_TYPE` varchar(255) DEFAULT NULL,
  `NAME` varchar(255) DEFAULT NULL,
  `DISPLAY_NAME` varchar(255) DEFAULT NULL,
  `BASE` tinyint(1) DEFAULT NULL,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`ROLE_CONFIG_GROUP_ID`,`REV`) USING BTREE,
  KEY `FK_RCG_REVISION_START` (`REV`) USING BTREE,
  CONSTRAINT `role_config_groups_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of role_config_groups_aud
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for role_staleness_status
-- ----------------------------
DROP TABLE IF EXISTS `role_staleness_status`;
CREATE TABLE `role_staleness_status` (
  `ROLE_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `STATUS` varchar(255) NOT NULL,
  KEY `IDX_ROLE_STALENESS_STATUS_ID` (`ROLE_ID`) USING BTREE,
  CONSTRAINT `role_staleness_status_ibfk_1` FOREIGN KEY (`ROLE_ID`) REFERENCES `roles` (`ROLE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of role_staleness_status
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS `roles`;
CREATE TABLE `roles` (
  `ROLE_ID` bigint(20) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `HOST_ID` bigint(20) NOT NULL,
  `ROLE_TYPE` varchar(255) NOT NULL,
  `CONFIGURED_STATUS` varchar(255) NOT NULL,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  `MERGED_KEYTAB` mediumblob,
  `MAINTENANCE_COUNT` int(11) NOT NULL DEFAULT '0',
  `DECOMMISSION_COUNT` int(11) NOT NULL DEFAULT '0',
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `ROLE_CONFIG_GROUP_ID` bigint(20) NOT NULL,
  `HAS_EVER_STARTED` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ROLE_ID`) USING BTREE,
  UNIQUE KEY `NAME` (`NAME`) USING BTREE,
  KEY `FK_ROLE_HOST` (`HOST_ID`) USING BTREE,
  KEY `FK_ROLE_SERVICE` (`SERVICE_ID`) USING BTREE,
  KEY `FK_ROLE_ROLE_CONFIG_GROUP` (`ROLE_CONFIG_GROUP_ID`) USING BTREE,
  CONSTRAINT `roles_ibfk_1` FOREIGN KEY (`HOST_ID`) REFERENCES `hosts` (`HOST_ID`),
  CONSTRAINT `roles_ibfk_2` FOREIGN KEY (`ROLE_CONFIG_GROUP_ID`) REFERENCES `role_config_groups` (`ROLE_CONFIG_GROUP_ID`),
  CONSTRAINT `roles_ibfk_3` FOREIGN KEY (`SERVICE_ID`) REFERENCES `services` (`SERVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of roles
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for roles_aud
-- ----------------------------
DROP TABLE IF EXISTS `roles_aud`;
CREATE TABLE `roles_aud` (
  `ROLE_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  `NAME` varchar(255) DEFAULT NULL,
  `ROLE_TYPE` varchar(255) DEFAULT NULL,
  `HOST_ID` bigint(20) DEFAULT NULL,
  `SERVICE_ID` bigint(20) DEFAULT NULL,
  `ROLE_CONFIG_GROUP_ID` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`ROLE_ID`,`REV`) USING BTREE,
  KEY `FK_ROLE_REVISION_START` (`REV`) USING BTREE,
  CONSTRAINT `roles_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of roles_aud
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for schema_version
-- ----------------------------
DROP TABLE IF EXISTS `schema_version`;
CREATE TABLE `schema_version` (
  `VERSION` int(11) NOT NULL,
  `OLD_VERSION` int(11) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of schema_version
-- ----------------------------
BEGIN;
INSERT INTO `schema_version` VALUES (60200, 60200);
COMMIT;

-- ----------------------------
-- Table structure for services
-- ----------------------------
DROP TABLE IF EXISTS `services`;
CREATE TABLE `services` (
  `SERVICE_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  `NAME` varchar(255) NOT NULL,
  `SERVICE_TYPE` varchar(255) DEFAULT NULL,
  `CLUSTER_ID` bigint(20) DEFAULT NULL,
  `MAINTENANCE_COUNT` int(11) NOT NULL DEFAULT '0',
  `DISPLAY_NAME` varchar(255) NOT NULL,
  `GENERATION` bigint(20) NOT NULL,
  PRIMARY KEY (`SERVICE_ID`) USING BTREE,
  UNIQUE KEY `NAME` (`NAME`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_SERVICE` (`CLUSTER_ID`,`DISPLAY_NAME`) USING BTREE,
  KEY `FK_SERVICE_CLUSTER` (`CLUSTER_ID`) USING BTREE,
  CONSTRAINT `services_ibfk_1` FOREIGN KEY (`CLUSTER_ID`) REFERENCES `clusters` (`CLUSTER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of services
-- ----------------------------
BEGIN;
INSERT INTO `services` VALUES (1, 8, 'mgmt', 'MGMT', NULL, 0, 'Cloudera Management Service', 1);
COMMIT;

-- ----------------------------
-- Table structure for services_aud
-- ----------------------------
DROP TABLE IF EXISTS `services_aud`;
CREATE TABLE `services_aud` (
  `SERVICE_ID` bigint(20) NOT NULL,
  `REV` bigint(20) NOT NULL,
  `REVTYPE` tinyint(4) DEFAULT NULL,
  `NAME` varchar(255) DEFAULT NULL,
  `SERVICE_TYPE` varchar(255) DEFAULT NULL,
  `CLUSTER_ID` bigint(20) DEFAULT NULL,
  `DISPLAY_NAME` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`SERVICE_ID`,`REV`) USING BTREE,
  KEY `FK_SERVICE_REVISION_START` (`REV`) USING BTREE,
  CONSTRAINT `services_aud_ibfk_1` FOREIGN KEY (`REV`) REFERENCES `revisions` (`REVISION_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of services_aud
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for snapshot_policies
-- ----------------------------
DROP TABLE IF EXISTS `snapshot_policies`;
CREATE TABLE `snapshot_policies` (
  `POLICY_ID` bigint(20) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL,
  `POLICY_IDENTIFIER` varchar(255) NOT NULL,
  `NAME` varchar(255) NOT NULL,
  `DESCRIPTION` longtext,
  `SERVICE_ID` bigint(20) NOT NULL,
  `SCHEDULE_ID` bigint(20) NOT NULL,
  `HOURLY_SNAPSHOTS` bigint(20) NOT NULL,
  `DAILY_SNAPSHOTS` bigint(20) NOT NULL,
  `WEEKLY_SNAPSHOTS` bigint(20) NOT NULL,
  `MONTHLY_SNAPSHOTS` bigint(20) NOT NULL,
  `YEARLY_SNAPSHOTS` bigint(20) NOT NULL,
  `MINUTE_OF_HOUR` tinyint(4) NOT NULL,
  `HOUR_OF_DAY` tinyint(4) NOT NULL,
  `DAY_OF_WEEK` tinyint(4) NOT NULL,
  `DAY_OF_MONTH` tinyint(4) NOT NULL,
  `MONTH_OF_YEAR` tinyint(4) NOT NULL,
  `HOURS_LIST` longtext,
  `ENTITIES_TO_SNAPSHOT` longtext,
  `ALERT_ON_START` bit(1) NOT NULL,
  `ALERT_ON_SUCCESS` bit(1) NOT NULL,
  `ALERT_ON_FAIL` bit(1) NOT NULL,
  `ALERT_ON_ABORT` bit(1) NOT NULL,
  `PAUSED` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`POLICY_ID`) USING BTREE,
  UNIQUE KEY `POLICY_IDENTIFIER` (`POLICY_IDENTIFIER`) USING BTREE,
  UNIQUE KEY `SCHEDULE_ID` (`SCHEDULE_ID`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_SP_NAME_SERVICE` (`NAME`,`SERVICE_ID`) USING BTREE,
  KEY `FK_SNAPSHOT_POLICY_SERVICE` (`SERVICE_ID`) USING BTREE,
  CONSTRAINT `snapshot_policies_ibfk_1` FOREIGN KEY (`SCHEDULE_ID`) REFERENCES `command_schedules` (`SPEC_ID`),
  CONSTRAINT `snapshot_policies_ibfk_2` FOREIGN KEY (`SERVICE_ID`) REFERENCES `services` (`SERVICE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of snapshot_policies
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user_auth_roles
-- ----------------------------
DROP TABLE IF EXISTS `user_auth_roles`;
CREATE TABLE `user_auth_roles` (
  `USER_ID` bigint(20) NOT NULL,
  `AUTH_ROLE_ID` bigint(20) NOT NULL,
  PRIMARY KEY (`USER_ID`,`AUTH_ROLE_ID`) USING BTREE,
  UNIQUE KEY `IDX_UNIQUE_USER_AUTH` (`USER_ID`,`AUTH_ROLE_ID`) USING BTREE,
  KEY `FK_F_AUTH_ROLE_ID` (`AUTH_ROLE_ID`) USING BTREE,
  KEY `FK_AUTH_USER_ID` (`USER_ID`) USING BTREE,
  CONSTRAINT `user_auth_roles_ibfk_1` FOREIGN KEY (`USER_ID`) REFERENCES `users` (`USER_ID`),
  CONSTRAINT `user_auth_roles_ibfk_2` FOREIGN KEY (`AUTH_ROLE_ID`) REFERENCES `auth_roles` (`AUTH_ROLE_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of user_auth_roles
-- ----------------------------
BEGIN;
INSERT INTO `user_auth_roles` VALUES (1, 10);
COMMIT;

-- ----------------------------
-- Table structure for user_roles
-- ----------------------------
DROP TABLE IF EXISTS `user_roles`;
CREATE TABLE `user_roles` (
  `USER_ROLE_ID` bigint(20) NOT NULL,
  `USER_ID` bigint(20) NOT NULL,
  `USER_ROLE` varchar(255) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`USER_ROLE_ID`) USING BTREE,
  KEY `FK_USER_ROLE` (`USER_ID`) USING BTREE,
  CONSTRAINT `user_roles_ibfk_1` FOREIGN KEY (`USER_ID`) REFERENCES `users` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of user_roles
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user_settings
-- ----------------------------
DROP TABLE IF EXISTS `user_settings`;
CREATE TABLE `user_settings` (
  `USER_SETTING_ID` bigint(20) NOT NULL,
  `USER_ID` bigint(20) NOT NULL,
  `ATTR` varchar(255) NOT NULL,
  `VALUE` longtext NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`USER_SETTING_ID`) USING BTREE,
  UNIQUE KEY `USER_ID` (`USER_ID`,`ATTR`) USING BTREE,
  KEY `FK_USER_SETTING_USER` (`USER_ID`) USING BTREE,
  CONSTRAINT `user_settings_ibfk_1` FOREIGN KEY (`USER_ID`) REFERENCES `users` (`USER_ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of user_settings
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `USER_ID` bigint(20) NOT NULL,
  `USER_NAME` varchar(255) NOT NULL,
  `PASSWORD_HASH` varchar(255) NOT NULL,
  `PASSWORD_SALT` bigint(20) NOT NULL,
  `PASSWORD_LOGIN` tinyint(1) NOT NULL,
  `OPTIMISTIC_LOCK_VERSION` bigint(20) NOT NULL DEFAULT '0',
  PRIMARY KEY (`USER_ID`) USING BTREE,
  UNIQUE KEY `unique_user_name` (`USER_NAME`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO `users` VALUES (1, 'admin', 'e00d6363bf437560b7bddd73ea5fee8a43c0cdb385443caeec429befed337bcb', 2395569924315652044, 1, 1);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
